package com.tarena.lbs.content.service;

import com.tarena.lbs.base.protocol.enums.ErrorCodeSupport;
import lombok.Getter;

@Getter
public enum ContentErrorCode implements ErrorCodeSupport {
    ARTICLE_ID_EMPTY("CONTENT_001", "文章ID不能为空"),
    ARTICLE_NOT_FOUND("CONTENT_002", "文章不存在"),
    USER_NOT_LOGIN("CONTENT_003", "请先登录"),
    BEHAVIOR_TYPE_EMPTY("CONTENT_004", "行为类型不能为空"),
    ARTICLE_ID_INVALID("CONTENT_005", "文章ID格式错误"),
    ARTICLE_ADD_ID_NOT_ALLOWED("CONTENT_006", "新增文章不允许传入ID");

    private final String code;
    private final String message;

    ContentErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}